#!/bin/sh

# Ensure that strace tests kernel PTRACE_O_TRACECLONE support properly.

. "${srcdir=.}/init.sh"

case "$(uname -rs)" in
	Linux\ 2.6.*) ;;
	*) skip_ 'The kernel is not Linux 2.6.*' ;;
esac

check_strace
check_prog timeout

timeout -s 9 9 \
$STRACE -df -enone / 2>&1 |
	grep -F -x 'ptrace_setoptions = 0xe' > /dev/null ||
		fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACECLONE support'
